package org.example.javademo.test08.demo2;

/**
 * @author gwf
 * @date 2025-03-04
 */
public class MainTest {
    public static void main(String[] args) {
        Door ironGates = new IronGates();
        Door woodenDoor = new WoodenDoor();
        Door securityDoor = new SecurityDoor();

        //用户操作
        User user = new User(ironGates);
        user.openDoor();
        user.closeDoor();

        User user1 = new User(woodenDoor);
        user1.openDoor();
        user1.closeDoor();

        User user2 = new User(securityDoor);
        user2.openDoor();
        user2.closeDoor();

        //小偷偷盗
        Thief thief = new Thief(ironGates);
        thief.steal();

        Thief thief1 = new Thief(woodenDoor);
        thief1.steal();

        Thief thief2 = new Thief(securityDoor);
        thief2.steal();

        //汽车防盗
        Car car = new Car();
        car.antiBells();
    }
}
